package cn.swust.designpatternlearningplatform.dao;

import cn.swust.designpatternlearningplatform.dao.sql.TeacherDaoSql;
import cn.swust.designpatternlearningplatform.domain.entity.Teacher;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.SelectProvider;

@Mapper
public interface TeacherDao {
    @SelectProvider(type = TeacherDaoSql.class,method = "getTeacherPassword")
    String getTeacherPassword(String number);
    @Results(value = {
            @Result(property = "id",column = "id"),
            @Result(property = "teacherAccount",column = "teacher_account"),
            @Result(property = "teacherName",column = "teacher_name"),
            @Result(property = "teacherPassword",column = "teacher_password"),
            })
    @SelectProvider(type = TeacherDaoSql.class,method = "getTeacherByNumber")
    Teacher getTeacherByNumber(String number);


}
